/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jsf;

import com.controllers.CompanyController;
import com.entities.Company;
import java.io.Serializable;
import java.util.List;
import javax.ejb.EJB;
import javax.inject.Named;
import javax.enterprise.context.RequestScoped;

/**
 *
 * @author ben
 */
@Named(value = "companyView")
@RequestScoped
public class CompanyView implements Serializable{

    /**
     * Creates a new instance of CompanyView
     */
    
        private Company company;

     
    
    @EJB
    private CompanyController companyController;
    public CompanyView() {
    }
        private List<Company> companies;

    
    public List<Company> getCompanies() {
        
        return companies = companyController.getAllCompanies();
    }
}
